package com.tech.cloudapp.biz.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tech.cloudapp.biz.service.IBQuestionClassifyService;
import com.tech.cloudapp.db.entity.QuestionClassify;
import com.tech.cloudapp.db.service.QuestionClassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Primary
@Service
public class BQuestionClassifyServiceImpl implements IBQuestionClassifyService {

    @Autowired
    private QuestionClassifyService questionClassifyServiceImpl;

    @Override
    public List<QuestionClassify> list() {
        QueryWrapper<QuestionClassify> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_del",0);
        List<QuestionClassify> list = this.questionClassifyServiceImpl.list(queryWrapper);
        if(list == null)
        {
            list = new ArrayList<>();
        }
        return list;
    }
}
